#ifndef _RANDOME_H_
#define _RANDOME_H_

/**
* @brief
* Class to generate random number
*/
class Random
{

private:

	static const int CMATH_N = 624;

public:

	/**
	* @brief						Constructor
	*/
	Random( void );

public:

	/**
	* @brief						Initialize random number generator.
	* @param rand			[in]	randome number generator to initialize
	* @param isRandomize	[in]	if true, calles Randomize() method.
	*/
	void			Initialize		( bool isRandomize = true );

	/**
	* @brief						Resets seed
	* @param rand			[in]	randome number generator to reset
	*/
	void			Randomize		( void );

	/**
	* @brief						Sets the seed of random number generator
	* @n					[in]	number to base seed
	*/
	void			SetRandomSeed	( unsigned int n );

	/**
	* @brief						Generates random unsigned integer
	* @param max			[in]	Maximum number generated
	* @return						Returns value between 0 to ( max - 1 )
	*/
	unsigned int	GetInt			( unsigned int max );

	/**
	* @brief						Generates random unsigned integer
	* @param max			[in]	Maximum number generated
	* @param min			[in]	Minimum number generated
	* @return						Returns value between min to ( max - 1 )
	*/
	unsigned int	GetInt			( unsigned int min, unsigned max);

	/**
	* @brief						Generates random unsigned integer
	* @param rand			[in]	Randome number generator to use
	* @return						Returns value between 0.0f to 1.0f
	*/
	float			GetFloat		( void );
	float			GetFloat		( float max );
	float			GetFloat		( float min, float max );

private:

	unsigned int				m_rSeed;
	unsigned int				m_rSeedSp;
	unsigned long				m_mt[ CMATH_N ];
	int							m_mti;
};

#endif // end of _RANDOME_H_